package com.ecoolex.discount.sales.ws;

import com.ecoolex.discount.sales.entity.UPlanCouponBatch;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import com.ecoolex.discount.sales.core.service.UPlanCouponService;
import com.ecoolex.discount.sales.core.service.UplanCouponBatchService;

@Service
public class CouponServiceImpl implements com.ecoolex.discount.sales.ws.CouponService {

	@Autowired
	UPlanCouponService uPlanCouponService;

	@Autowired
	UplanCouponBatchService uplanCouponBatchService;

	@Override
	public void fetch(Long batchId,int amount) {
		UPlanCouponBatch batch = uplanCouponBatchService.get(batchId);
		uPlanCouponService.fetchTimes(batch,amount);
	}
}
